//
//  NSDate+Helper.h
//  iSeal5200
//
//  Created by He Yuan on 12-12-14.
//  Copyright (c) 2012年 http://www.heyuan110.com. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDate(Extend)

- (NSString *)getFormatYearMonthDay;

- (int )getWeekNumOfMonth;

- (int )getWeekOfYear;

- (NSDate *)dateAfterDay:(int)day;

- (NSDate *)dateafterMonth:(int)month;

- (NSUInteger)getDay;

- (NSUInteger)getMonth;

- (NSUInteger)getYear;

- (int )getHour;

- (int)getMinute;

- (int)getSecond:(NSDate *)date;

- (int )getHour:(NSDate *)date;
;
- (int)getMinute:(NSDate *)date;

- (int)getSecond;

- (NSUInteger)daysAgo;

- (NSUInteger)daysAgoAgainstMidnight;

- (NSString *)stringDaysAgo;

- (NSString *)stringDaysAgoAgainstMidnight:(BOOL)flag;

- (NSUInteger)weekday;

+ (NSDate *)dateFromString:(NSString *)string;

+ (NSDate *)dateFromString:(NSString *)string withFormat:(NSString *)format;

+ (NSString *)stringFromDate:(NSDate *)date withFormat:(NSString *)format;

+ (NSString *)stringFromDate:(NSDate *)date;

+ (NSString *)dateFormatStringFromDate:(NSDate *)date;

+ (NSString *)timeFormatStringFromDate:(NSDate *)date;

+ (NSString *)stringForDisplayFromDate:(NSDate *)date prefixed:(BOOL)prefixed;

+ (NSString *)stringForDisplayFromDate:(NSDate *)date;

- (NSString *)stringWithFormat:(NSString *)format;

- (NSString *)string;

- (NSString *)stringWithDateStyle:(NSDateFormatterStyle)dateStyle timeStyle:(NSDateFormatterStyle)timeStyle;

- (NSDate *)beginningOfWeek;

- (NSDate *)beginningOfDay;

- (NSDate *)beginningOfMonth;

- (NSDate *)endOfMonth;

- (NSDate *)endOfWeek;

+ (NSString *)dateFormatString;

+ (NSString *)timeFormatString;

+ (NSString *)timestampFormatString;

+ (NSString *)dbFormatString;

+ (NSString *)stringFromDateNow:(NSDate*)todate;

-(NSString *)getAstroWithMonth:(int)m day:(int)d;

@end






